Books on my bookshelf that I could easily and quickly lay my hands on:
"The Canon Debate", McDonald and Sanders (Hendrickson Publishers, 2002)
"The Biblical Canon", McDonald (Baker Academic, 2007)
"The Formation of the Hebrew Bible: A New Reconstruction", Carr (Oxford University Press, 2011)
"Scribal Culture and the Making of the Hebrew Bible", Karel Van Der Toorn (Harvard University Press, 2007)
"The New Testament Canon: Its Making and Meaning", Gamble (Fortress Press, 1985; Wipf and Stock, 2002)
Do not expect uniform agreement among scholars, but research them and decide on a model that suits your understanding of the externals - culture, religious politics, etc.
Each of these books lists any number of their sources.
Doug